<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <title>乐淘商城-分类页</title>
  <link rel="icon" href="favicon.ico">
  <link rel="stylesheet" href="lib/mui/css/mui.css">
  <link rel="stylesheet" href="lib/fa/css/font-awesome.css">
  <link rel="stylesheet" href="css/common.css">
  <link rel="stylesheet" href="css/search.css">
</head>
<body>

<div class="lt_container">
  <div class="lt_header">
    <a href="javascript:history.go(-1);" class="icon_left"><span class="mui-icon mui-icon-back"></span></a>
    <h3>搜索中心</h3>
  </div>
  
  <div class="lt_main">
    <!-- 滚动容器的父盒子 -->
    <div class="mui-scroll-wrapper">
      <!-- 子盒子 -->
      <div class="mui-scroll">
      
        <!-- 乐淘搜索 -->
        <div class="lt_search">
          <input type="text" class="search_inp" placeholder="请输入搜索关键字">
          <button class="mui-btn mui-btn-primary search_btn">搜索</button>
        </div>
        
        <!-- 乐淘历史 -->
        <div class="lt_history">
          
        
        
        </div>
      
      </div>
    </div>
  </div>
  
  
  <div class="lt_footer">
    <ul>
      <li>
        <a href="index.html">
          <span class="fa fa-home"></span>
          <p>首页</p>
        </a>
      </li>
      <li>
        <a href="category.html">
          <span class="fa fa-bars"></span>
          <p>分类</p>
        </a>
      </li>
      <li>
        <a href="cart.html">
          <span class="fa fa-shopping-cart"></span>
          <p>购物车</p>
        </a>
      </li>
      <li>
        <a href="user.html">
          <span class="fa fa-user"></span>
          <p>会员中心</p>
        </a>
      </li>
    </ul>
  
  </div>
</div>

<script type="text/html" id="searchTpl">
  
  {{ if arr.length === 0 }}
    <p>没有搜索历史记录</p>
  {{ /if }}
  
  {{ if arr.length > 0 }}
    <!-- 标题 -->
    <div class="title mui-clearfix">
      <span class="mui-pull-left">搜索历史</span>
      <span class="mui-pull-right btn_empty"><i class="fa fa-trash"></i>清空记录</span>
    </div>
    <!-- 内容 -->
    <div class="content">
      <ul>
        {{ each arr v i }}
          <li>
            <!--跳转到 searchList 页面-->
            <a href="searchList.html?key={{ v }}">{{ v }}</a>
            <span class="mui-icon mui-icon-closeempty mui-pull-right btn_delete" data-index="{{ i }}"></span>
          </li>
        {{ /each }}
      </ul>
    </div>
  {{ /if }}

</script>


<script src="lib/zepto/zepto.min.js"></script>
<script src="lib/mui/js/mui.js"></script>
<script src="lib/artTemplate/template-web.js"></script>
<script src="js/common.js"></script>
<!-- 引入自己的 js -->
<script src="js/search.js"></script>

</body>
</html>